﻿using MediatR;
using T.Basic.API.Appliction.Command.FuelCostCommand;
using T.Basic.Domain.T.Basic.Model;
using T.Basic.Repository.BasicInterface;

namespace T.Basic.API.Appliction.CommandHandlers.FuelCostHanders
{
    /// <summary>
    /// 反填油费信息
    /// </summary>
    public class FuelCostGetByIdCommandHandler : IRequestHandler<FuelCostGetByIdCommand, FuelCost>
    {
        private readonly IFuelCostRepository _FuelCostrepository;
        public FuelCostGetByIdCommandHandler(IFuelCostRepository fuelCostrepository)
        {
            _FuelCostrepository = fuelCostrepository;
        }
        public async Task<FuelCost> Handle(FuelCostGetByIdCommand request, CancellationToken cancellationToken)
        {
            return await _FuelCostrepository.GetModelsAsync(request.FuelCostId);
        }
    }
}
